home *** CD-ROM | disk | FTP | other *** search
/ Champak Vol F-12 / (Vol F-12) Jun 02 2012.iso / Screensaver / screensaver_installer.exe / ____swmx / scripts / frame_1 / DoAction_4.as < prev    next >
Text File  |  2004-10-21  |  10KB  |  279 lines

  1. _global.ScreenweaverSystem = function()
  2. {
  3.    this.init();
  4. };
  5. ScreenweaverSystem.prototype.init = function()
  6. {
  7.    this.Screen = new ScreenweaverScreen();
  8.    this.Dialogs = new ScreenweaverDialogs();
  9.    this.Colors = new ScreenweaverColors();
  10.    this.Version = new ScreenweaverVersion();
  11.    this.Messages = new ScreenweaverMessages();
  12.    this.Plugins = new ScreenweaverPlugins();
  13.    this.Registry = new ScreenweaverRegistry();
  14.    _global.SW_HIDE = 0;
  15.    _global.SW_SHOWNORMAL = 1;
  16.    _global.SW_NORMAL = 1;
  17.    _global.SW_SHOWMINIMIZED = 2;
  18.    _global.SW_SHOWMAXIMIZED = 3;
  19.    _global.SW_MAXIMIZE = 3;
  20.    _global.SW_SHOWNOACTIVATE = 4;
  21.    _global.SW_SHOW = 5;
  22.    _global.SW_MINIMIZE = 6;
  23.    _global.SW_SHOWMINNOACTIVE = 7;
  24.    _global.SW_SHOWNA = 8;
  25.    _global.SW_RESTORE = 9;
  26.    _global.SW_SHOWDEFAULT = 10;
  27.    _global.SW_FORCEMINIMIZE = 11;
  28.    _global.SW_MAX = 11;
  29.    _global.SPI_GETBEEP = 1;
  30.    _global.SPI_SETBEEP = 2;
  31.    _global.SPI_GETMOUSE = 3;
  32.    _global.SPI_SETMOUSE = 4;
  33.    _global.SPI_GETBORDER = 5;
  34.    _global.SPI_SETBORDER = 6;
  35.    _global.SPI_GETKEYBOARDSPEED = 10;
  36.    _global.SPI_SETKEYBOARDSPEED = 11;
  37.    _global.SPI_LANGDRIVER = 12;
  38.    _global.SPI_ICONHORIZONTALSPACING = 13;
  39.    _global.SPI_GETSCREENSAVETIMEOUT = 14;
  40.    _global.SPI_SETSCREENSAVETIMEOUT = 15;
  41.    _global.SPI_GETSCREENSAVEACTIVE = 16;
  42.    _global.SPI_SETSCREENSAVEACTIVE = 17;
  43.    _global.SPI_GETGRIDGRANULARITY = 18;
  44.    _global.SPI_SETGRIDGRANULARITY = 19;
  45.    _global.SPI_SETDESKWALLPAPER = 20;
  46.    _global.SPI_SETDESKPATTERN = 21;
  47.    _global.SPI_GETKEYBOARDDELAY = 22;
  48.    _global.SPI_SETKEYBOARDDELAY = 23;
  49.    _global.SPI_ICONVERTICALSPACING = 24;
  50.    _global.SPI_GETICONTITLEWRAP = 25;
  51.    _global.SPI_SETICONTITLEWRAP = 26;
  52.    _global.SPI_GETMENUDROPALIGNMENT = 27;
  53.    _global.SPI_SETMENUDROPALIGNMENT = 28;
  54.    _global.SPI_SETDOUBLECLKWIDTH = 29;
  55.    _global.SPI_SETDOUBLECLKHEIGHT = 30;
  56.    _global.SPI_GETICONTITLELOGFONT = 31;
  57.    _global.SPI_SETDOUBLECLICKTIME = 32;
  58.    _global.SPI_SETMOUSEBUTTONSWAP = 33;
  59.    _global.SPI_SETICONTITLELOGFONT = 34;
  60.    _global.SPI_GETFASTTASKSWITCH = 35;
  61.    _global.SPI_SETFASTTASKSWITCH = 36;
  62.    _global.SPI_SETDRAGFULLWINDOWS = 37;
  63.    _global.SPI_GETDRAGFULLWINDOWS = 38;
  64.    _global.SPI_GETNONCLIENTMETRICS = 41;
  65.    _global.SPI_SETNONCLIENTMETRICS = 42;
  66.    _global.SPI_GETMINIMIZEDMETRICS = 43;
  67.    _global.SPI_SETMINIMIZEDMETRICS = 44;
  68.    _global.SPI_GETICONMETRICS = 45;
  69.    _global.SPI_SETICONMETRICS = 46;
  70.    _global.SPI_SETWORKAREA = 47;
  71.    _global.SPI_GETWORKAREA = 48;
  72.    _global.SPI_SETPENWINDOWS = 49;
  73.    _global.SPI_GETHIGHCONTRAST = 66;
  74.    _global.SPI_SETHIGHCONTRAST = 67;
  75.    _global.SPI_GETKEYBOARDPREF = 68;
  76.    _global.SPI_SETKEYBOARDPREF = 69;
  77.    _global.SPI_GETSCREENREADER = 70;
  78.    _global.SPI_SETSCREENREADER = 71;
  79.    _global.SPI_GETANIMATION = 72;
  80.    _global.SPI_SETANIMATION = 73;
  81.    _global.SPI_GETFONTSMOOTHING = 74;
  82.    _global.SPI_SETFONTSMOOTHING = 75;
  83.    _global.SPI_SETDRAGWIDTH = 76;
  84.    _global.SPI_SETDRAGHEIGHT = 77;
  85.    _global.SPI_SETHANDHELD = 78;
  86.    _global.SPI_GETLOWPOWERTIMEOUT = 79;
  87.    _global.SPI_GETPOWEROFFTIMEOUT = 80;
  88.    _global.SPI_SETLOWPOWERTIMEOUT = 81;
  89.    _global.SPI_SETPOWEROFFTIMEOUT = 82;
  90.    _global.SPI_GETLOWPOWERACTIVE = 83;
  91.    _global.SPI_GETPOWEROFFACTIVE = 84;
  92.    _global.SPI_SETLOWPOWERACTIVE = 85;
  93.    _global.SPI_SETPOWEROFFACTIVE = 86;
  94.    _global.SPI_SETCURSORS = 87;
  95.    _global.SPI_SETICONS = 88;
  96.    _global.SPI_GETDEFAULTINPUTLANG = 89;
  97.    _global.SPI_SETDEFAULTINPUTLANG = 90;
  98.    _global.SPI_SETLANGTOGGLE = 91;
  99.    _global.SPI_GETWINDOWSEXTENSION = 92;
  100.    _global.SPI_SETMOUSETRAILS = 93;
  101.    _global.SPI_GETMOUSETRAILS = 94;
  102.    _global.SPI_SETSCREENSAVERRUNNING = 97;
  103.    _global.SPI_GETFILTERKEYS = 50;
  104.    _global.SPI_SETFILTERKEYS = 51;
  105.    _global.SPI_GETTOGGLEKEYS = 52;
  106.    _global.SPI_SETTOGGLEKEYS = 53;
  107.    _global.SPI_GETMOUSEKEYS = 54;
  108.    _global.SPI_SETMOUSEKEYS = 55;
  109.    _global.SPI_GETSHOWSOUNDS = 56;
  110.    _global.SPI_SETSHOWSOUNDS = 57;
  111.    _global.SPI_GETSTICKYKEYS = 58;
  112.    _global.SPI_SETSTICKYKEYS = 59;
  113.    _global.SPI_GETACCESSTIMEOUT = 60;
  114.    _global.SPI_SETACCESSTIMEOUT = 61;
  115.    _global.SPI_GETSERIALKEYS = 62;
  116.    _global.SPI_SETSERIALKEYS = 63;
  117.    _global.SPI_GETSOUNDSENTRY = 64;
  118.    _global.SPI_SETSOUNDSENTRY = 65;
  119.    _global.SPI_GETMOUSEHOVERWIDTH = 98;
  120.    _global.SPI_SETMOUSEHOVERWIDTH = 99;
  121.    _global.SPI_GETMOUSEHOVERHEIGHT = 100;
  122.    _global.SPI_SETMOUSEHOVERHEIGHT = 101;
  123.    _global.SPI_GETMOUSEHOVERTIME = 102;
  124.    _global.SPI_SETMOUSEHOVERTIME = 103;
  125.    _global.SPI_GETWHEELSCROLLLINES = 104;
  126.    _global.SPI_SETWHEELSCROLLLINES = 105;
  127.    _global.SPI_GETSHOWIMEUI = 110;
  128.    _global.SPI_SETSHOWIMEUI = 111;
  129.    _global.SPI_GETMOUSESPEED = 112;
  130.    _global.SPI_SETMOUSESPEED = 113;
  131.    _global.SPI_GETSCREENSAVERRUNNING = 114;
  132.    _global.SPI_GETACTIVEWINDOWTRACKING = 4096;
  133.    _global.SPI_SETACTIVEWINDOWTRACKING = 4097;
  134.    _global.SPI_GETMENUANIMATION = 4098;
  135.    _global.SPI_SETMENUANIMATION = 4099;
  136.    _global.SPI_GETCOMBOBOXANIMATION = 4100;
  137.    _global.SPI_SETCOMBOBOXANIMATION = 4101;
  138.    _global.SPI_GETLISTBOXSMOOTHSCROLLING = 4102;
  139.    _global.SPI_SETLISTBOXSMOOTHSCROLLING = 4103;
  140.    _global.SPI_GETGRADIENTCAPTIONS = 4104;
  141.    _global.SPI_SETGRADIENTCAPTIONS = 4105;
  142.    _global.SPI_GETMENUUNDERLINES = 4106;
  143.    _global.SPI_SETMENUUNDERLINES = 4107;
  144.    _global.SPI_GETACTIVEWNDTRKZORDER = 4108;
  145.    _global.SPI_SETACTIVEWNDTRKZORDER = 4109;
  146.    _global.SPI_GETHOTTRACKING = 4110;
  147.    _global.SPI_SETHOTTRACKING = 4111;
  148.    _global.SPI_GETFOREGROUNDLOCKTIMEOUT = 8192;
  149.    _global.SPI_SETFOREGROUNDLOCKTIMEOUT = 8193;
  150.    _global.SPI_GETACTIVEWNDTRKTIMEOUT = 8194;
  151.    _global.SPI_SETACTIVEWNDTRKTIMEOUT = 8195;
  152.    _global.SPI_GETFOREGROUNDFLASHCOUNT = 8196;
  153.    _global.SPI_SETFOREGROUNDFLASHCOUNT = 8197;
  154. };
  155. ScreenweaverSystem.prototype.shellMailTo = function(address, subject, body)
  156. {
  157.    var mailto = "mailto:";
  158.    if(address != undefined)
  159.    {
  160.       mailto += address;
  161.       if(subject != undefined)
  162.       {
  163.          mailto += "?subject=" + escape(subject);
  164.          if(body != undefined)
  165.          {
  166.             mailto += "&body=" + escape(body);
  167.          }
  168.       }
  169.    }
  170.    swSystem.shellOpenDocument(mailto);
  171. };
  172. ScreenweaverSystem.prototype.getMonitorModes = function()
  173. {
  174.    var i = 0;
  175.    while(i < swSystem.data.monitorCount)
  176.    {
  177.       swInterface.callMethod("requestScreenData",i,swSystem.onMonitorModes);
  178.       i++;
  179.    }
  180. };
  181. ScreenweaverSystem.prototype.onMonitorModes = function(success, m)
  182. {
  183.    swSystem.data.monitors[m.info.number] = m;
  184.    if(m.info.number == swSystem.data.monitorCount - 1)
  185.    {
  186.       swEvents.broadcastMessage("onMonitorModes");
  187.    }
  188. };
  189. ScreenweaverSystem.prototype.shellExecute = function(operation, filename, parameters, directory, showCmd, callback, scope)
  190. {
  191.    var args = {nShowCmd:int(showCmd),lpDirectory:directory,lpParameters:parameters.toString(),lpFile:filename,lpVerb:operation,hHandle:swWindow.data.HostHandle};
  192.    swInterface.callDLLMethod("shell32.dll","ShellExecuteA",args,callback,scope);
  193. };
  194. ScreenweaverSystem.prototype.shellOpenApplication = function(filename, parameters, showCmd, callback, scope)
  195. {
  196.    swSystem.shellExecute("open",filename,parameters,"",showCmd,callback,scope);
  197. };
  198. ScreenweaverSystem.prototype.shellOpenDocument = function(filename, callback, scope)
  199. {
  200.    swSystem.shellExecute("open",filename,"","",1,callback,scope);
  201. };
  202. ScreenweaverSystem.prototype.shellPrint = function(filename, callback, scope)
  203. {
  204.    swSystem.shellExecute("print",filename,"","",1,callback,scope);
  205. };
  206. ScreenweaverSystem.prototype.shellExplore = function(folder, callback, scope)
  207. {
  208.    swSystem.shellExecute("explore",folder,"","",1,callback,scope);
  209. };
  210. ScreenweaverSystem.prototype.shellFind = function(folder, callback, scope)
  211. {
  212.    swSystem.shellExecute("find",folder,"","",1,callback,scope);
  213. };
  214. ScreenweaverSystem.prototype.shellEdit = function(filename, callback, scope)
  215. {
  216.    swSystem.shellExecute("edit",filename,"","",1,callback,scope);
  217. };
  218. ScreenweaverSystem.prototype.getPlayerPath = function(addPath)
  219. {
  220.    if(swApplication.Data.EngineLoaded)
  221.    {
  222.       var index = swApplication.Data.EnginePath.lastIndexOf("\\");
  223.       if(index != -1)
  224.       {
  225.          return swApplication.Data.EnginePath.substr(0,index + 1) + addPath;
  226.       }
  227.       this.apiError("Path is invalid: " + swApplication.Data.EnginePath);
  228.    }
  229.    return "[ The swInterface engine didn\'t properly load. ]";
  230. };
  231. ScreenweaverSystem.prototype.getWindowsDirectory = function()
  232. {
  233.    return swSystem.data.dirWindows;
  234. };
  235. ScreenweaverSystem.prototype.getSystemDirectory = function()
  236. {
  237.    return swSystem.data.dirSystem;
  238. };
  239. ScreenweaverSystem.prototype.getFlashPluginPath = function()
  240. {
  241.    if(swSystem.data.pathFlashPlugin == undefined)
  242.    {
  243.       return "[OCX Path is unknown]";
  244.    }
  245.    return swSystem.data.pathFlashPlugin;
  246. };
  247. ScreenweaverSystem.prototype.getUserName = function()
  248. {
  249.    return swSystem.data.UserName;
  250. };
  251. ScreenweaverSystem.prototype.getComputerName = function()
  252. {
  253.    return swSystem.data.ComputerName;
  254. };
  255. ScreenweaverSystem.prototype.setClipboardText = function(text)
  256. {
  257.    getURL("FSCommand:sw_setClipboardText",text);
  258. };
  259. ScreenweaverSystem.prototype.getClipboardText = function(callback, scope)
  260. {
  261.    args = {};
  262.    swInterface.callMethod("getClipboardText",args,callback,false,scope);
  263. };
  264. ScreenweaverSystem.prototype.registerWindowMessage = function(message, handler, handlerScope, callback, scope)
  265. {
  266.    args = {message:message,CallbackID:swInterface.addCallback(handler,true,handlerScope)};
  267.    swInterface.callMethod("registerWindowMessage",args,callback,false,scope);
  268. };
  269. ScreenweaverSystem.prototype.getMouse = function(callback, scope)
  270. {
  271.    args = {};
  272.    swInterface.callMethod("GetMouseXY",args,callback,false,scope);
  273. };
  274. ScreenweaverSystem.prototype.getEnvironmentVar = function(variable, callback, scope)
  275. {
  276.    args = {variable:variable.toString()};
  277.    swInterface.callMethod("GetEnvironmentVar",args,callback,false,scope);
  278. };
  279.